﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Easily
{
    /// <summary>
    /// 显示用户说明文档
    /// 备注：文档存储路径为程序运行地址同级文件夹中的usebook.txt
    /// </summary>
    public partial class frmusebook : Form
    {
        string usingbook;
        /// <summary>
        /// 创建用户文档显示窗体，并将usebook.txt的内容赋值至窗体
        /// </summary>
        public frmusebook()
        {
            InitializeComponent();
            usingbook =" ";
            usingbook = File.ReadAllText(Directory.GetParent(Application.StartupPath)+@"\usebook.txt");
            textBoxbook.Text=usingbook;
        }
        /// <summary>
        /// 将修改后的用户文档保存下来
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            usingbook =textBoxbook.Text ;
            File.WriteAllText(Directory.GetParent(Application.StartupPath) + @"\usebook.txt", usingbook);
        }

       
      
    }
}
